import Vue from 'vue'
import VueRouter from 'vue-router'

// 页面
import Home from '../views/Home'
import Sports from '../views/Sports'
import New from '../views/New'
import SportsHome from '../views/child/SportsHome'
import Domestic from '../views/child/Domestic'
import Abroad from '../views/child/Abroad'
Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    component: Home
  },
  {
    path: '/new',
    component: New
  },
  {
    path: '/sports',
    component: Sports,
    children: [
      {
        path: 'sportshome',
        component: SportsHome
      },
      {
        path: 'domestic',
        component: Domestic
      },
      {
        path: 'abroad',
        component: Abroad
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router